{template 'common/header'}
<div class="main">
	<ul class="nav nav-tabs">
		<li{if $_GPC['do'] == 'eventlist'} class="active"{/if}><a href="{php echo $this->createWebUrl('eventlist');}">拆礼盒管理</a></li>
        <li{if $_GPC['do'] == 'post'} class="active"{/if}><a href="{php echo url('platform/reply/post',array('m'=>'stonefish_chailihe'));}">添加拆礼盒规则</a></li>
		{if $rid!=''}<li{if $_GPC['do'] == 'post'} class="active"{/if}><a href="{php echo url('platform/reply/post',array('rid'=>$rid,'m'=>'stonefish_chailihe'));}">修改拆礼盒规则</a></li>{/if}
		<li{if $_GPC['do'] == 'userlist' || $_GPC['do'] == '' } class="active"{/if}><a href="{php echo $this->createWebUrl('userlist',array('id'=>$rid));}">参与粉丝管理</a></li>
		<li{if $_GPC['do'] == 'sharedata'} class="active"{/if}><a href="{php echo $this->createWebUrl('sharedata',array('id'=>$rid));}">分享数据管理</a></li>
		<li{if $_GPC['do'] == 'prizedata'} class="active"{/if}><a href="{php echo $this->createWebUrl('prizedata',array('id'=>$rid));}">奖品数据管理</a></li>
	</ul>
	<div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
        	<input type="hidden" name="m" value="stonefish_chailihe" />
        	<input type="hidden" name="do" value="userlist" />
        	<input type="hidden" name="id" value="{$rid}" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">真实姓名</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" name="realname" id="" type="text" value="{$_GPC['realname']}" placeholder="真实姓名"> 
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">手机号码</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" name="mobile" id="" type="text" value="{$_GPC['mobile']}" placeholder="手机号码"> 
				</div>
			</div>			
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">状态</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<select name="status" class="form-control" style="float:left">
                    	<option value="" {if $_GPC['status']==''}selected{/if}>全部</option>
                        <option value="1" {if $_GPC['status']=='1'}selected{/if}>未打开</option>
						<option value="2" {if $_GPC['status']=='2'}selected{/if}>已打开</option>
                        <option value="3" {if $_GPC['status']=='3'}selected{/if}>未中奖</option>
						<option value="4" {if $_GPC['status']=='4'}selected{/if}>已中奖</option>
						<option value="5" {if $_GPC['status']=='5'}selected{/if}>已发奖</option>
						<option value="6" {if $_GPC['status']=='6'}selected{/if}>虚拟奖</option>
                	</select>
				</div>
                <div class=" col-xs-12 col-sm-2 col-lg-2">
					<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
				</div>
			</div>
		</form>
	</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">幸运拆礼盒用户详细数据  |  总数:{$total}</div>
		<div class="panel-body table-responsive">
		    <form action="" method="post" onsubmit="">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width:60px;" class="row-first">选择</td>
						<th style="width:90px;">姓名</th>
						<th style="width:100px;">电话</th>
						{if $rid==''}<th style="width:40px;">规则</th>{/if}
						<th style="width:100px;">礼盒名称</th>
						<th style="width:100px;">奖品名称</th>
						<th style="width:60px;" class="row-hover">分享量</th>
						<th style="width:80px;">是否打开</th>
						<th style="width:80px;">是否中奖</th>
						<th style="width:150px;">注册/分享时间</th>
						<th style="width:60px;">操作</th>
					</tr>
				</thead>
				<tbody id="main">
				{php $i=1;}
					{loop $list_praise $row}
					<tr>
					    <td><input type="checkbox" name="select[]" value="{$row['id']}" /></td>
					    <td>{$row['realname']}</td>
						<td>{$row['mobile']}</td>
						{if $rid==''}<td><a href="{php echo url('site/entry/userlist', array('m' => 'stonefish_chailihe','id'=>$row['rid']))}">{$row['rid']}</a></td>{/if}
						<td>{$row['lihetitle']}</td>
						<td>{$row['title']}</td>
						<td><a href="{php echo url('site/entry/sharedata', array('m' => 'stonefish_chailihe','uid' => $row['id'], 'id' => $row['rid']))}">{$row['sharenum']}</a></td>
						<td>{if $row['openlihe']==0}未打开{else}<font color=red>已打开</font>{/if}</td>
						<td>{if $row['zhongjiang']==0}未中奖{/if}{if $row['zhongjiang']==1}<a href="{php echo url('site/entry/dosjiang', array('m' => 'stonefish_chailihe','rid' => $row['rid'], 'id' => $row['id'], 'ac' => 'userlist', 'status' => 2))}">发　奖{/if}</a>{if $row['zhongjiang']==2}已领奖{/if}</td>                                    
						<td>{php echo date('Y-m-d H:i:s', $row['datatime']);}</br>{php echo date('Y-m-d H:i:s', $row['sharetime']);}</td>
						<td style="width:60px;font-size:12px; color:#666;">{if $row['status']}<a href="{php echo url('site/entry/dos', array('m' => 'stonefish_chailihe','rid' => $row['rid'], 'id' => $row['id'], 'ac' => 'userlist', 'status' => 0))}" class="">未屏蔽</a>{else}<a href="{php echo url('site/entry/dos', array('m' => 'stonefish_chailihe','rid' => $row['rid'], 'id' => $row['id'], 'ac' => 'userlist','status' => 1))}" class="">已屏蔽</a>{/if}</td>
					</tr>
					{php $i++;}
					{/loop}
				</tbody>
			</table>
			<table class="table">
				<tr>
					<td style="width:60px;"><input type="checkbox" class="check_all"/></td>
					<td>
						<input type="submit" name="delete" value="删除" class="btn btn-primary" />
						<input type="hidden" name="token" value="{$_W['token']}" />
					</td>
				</tr>
			</table>
			</form>			
	    </div>
	</div>
	{$pager}
</div>
<script>
$(function(){   
    $(".check_all").click(function(){
       var checked = $(this).get(0).checked;
       $("input[type=checkbox]").attr("checked",checked);
    });	
});
</script>
{template 'common/footer'}